﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Diplomova_prace
{
    public static class Formulas
    {
       
        public static string Midpoint = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Munderover(Symbols.Integral,Mathml.Literal("a"),Mathml.Literal("b"))+Mathml.Literal("f")+Mathml.LZ+Mathml.Literal("x")+Mathml.PZ+Mathml.Mo(Symbols.AproximatelyEqual)+Mathml.LZ+Mathml.Literal("b")+Mathml.Mo("-")+Mathml.Literal("a")+Mathml.PZ
            + Mathml.HLZ
            + Mathml.Literal("f")+Mathml.LZ+Mathml.Frac(Mathml.Literal("a")+Mathml.Mo("+")+Mathml.Literal("b"),Mathml.Constant(2))+Mathml.PZ
            + Mathml.HPZ + Mathml.EndMath).ToString();

        public static string Trapezodial = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Munderover(Symbols.Integral, Mathml.Literal("a"), Mathml.Literal("b")) + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") + Mathml.PZ + Mathml.Mo(Symbols.AproximatelyEqual) + Mathml.Frac(Mathml.Literal("b") + Mathml.Mo("-") + Mathml.Literal("a"), Mathml.Constant(2))
            + Mathml.HLZ 
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("a") + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("b") + Mathml.PZ
            + Mathml.HPZ+Mathml.EndMath).ToString();

        public static string Simpson = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Munderover(Symbols.Integral, Mathml.Literal("a"), Mathml.Literal("b")) + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") + Mathml.PZ + Mathml.Mo(Symbols.AproximatelyEqual) + Mathml.Frac(Mathml.Literal("b") + Mathml.Mo("-") + Mathml.Literal("a"), Mathml.Constant(6))
            + Mathml.HLZ 
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("a") + Mathml.PZ 
            + Mathml.Mo("+") +Mathml.Constant(4)+Mathml.Literal("f")+Mathml.LZ+Mathml.Frac(Mathml.Literal("a")+Mathml.Mo("+")+Mathml.Literal("b"),Mathml.Constant(2))+Mathml.PZ
            + Mathml.Mo("+") + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("b") + Mathml.PZ
            + Mathml.HPZ + Mathml.EndMath).ToString();

        public static string Bool = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Munderover(Symbols.Integral, Mathml.Literal("a"), Mathml.Literal("b")) + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") + Mathml.PZ + Mathml.Mo(Symbols.AproximatelyEqual) + Mathml.Frac(Mathml.Literal("b") + Mathml.Mo("-") + Mathml.Literal("a"), Mathml.Constant(90)) 
            + Mathml.HLZ 
            + Mathml.Constant(7) + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("a") + Mathml.PZ 
            + Mathml.Mo("+") + Mathml.Constant(32) + Mathml.Literal("f") + Mathml.LZ + Mathml.Frac(Mathml.Constant(3)+Mathml.Literal("a") + Mathml.Mo("+") + Mathml.Literal("b"), Mathml.Constant(4)) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Constant(12)+Mathml.Literal("f") + Mathml.LZ + Mathml.Frac(Mathml.Literal("a") + Mathml.Mo("+") + Mathml.Literal("b"), Mathml.Constant(2)) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Constant(32) + Mathml.Literal("f") + Mathml.LZ + Mathml.Frac(Mathml.Literal("a") + Mathml.Mo("+") + Mathml.Constant(3) + Mathml.Literal("b"), Mathml.Constant(4)) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Constant(7) + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("b") + Mathml.PZ 
            + Mathml.HPZ+Mathml.EndMath).ToString();

        public static string ThreeEighths = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Munderover(Symbols.Integral, Mathml.Literal("a"), Mathml.Literal("b")) + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") + Mathml.PZ + Mathml.Mo(Symbols.AproximatelyEqual) + Mathml.Frac(Mathml.LZ+Mathml.Literal("b") + Mathml.Mo("-") + Mathml.Literal("a")+Mathml.PZ, Mathml.Constant(8)) 
            + Mathml.HLZ
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("a") + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Constant(3) + Mathml.Literal("f") + Mathml.LZ + Mathml.Frac(Mathml.Constant(2) + Mathml.Literal("a") + Mathml.Mo("+") + Mathml.Literal("b"), Mathml.Constant(3)) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Constant(3) + Mathml.Literal("f") + Mathml.LZ + Mathml.Frac(Mathml.Literal("a") + Mathml.Mo("+") + Mathml.Constant(2) + Mathml.Literal("b"), Mathml.Constant(3)) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("b") + Mathml.PZ
            + Mathml.HPZ + Mathml.EndMath).ToString();

        public static string ComMidPoint = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Munderover(Symbols.Integral, Mathml.Literal("a"), Mathml.Literal("b")) + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") + Mathml.PZ + Mathml.Mo(Symbols.AproximatelyEqual) + Mathml.Literal("h")
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(1), Mathml.Literal("m"))
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Frac(Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("i") + Mathml.Minus + Mathml.Constant(1)) + Mathml.Mo("+") + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("i") + Mathml.Plus + Mathml.Constant(1)), Mathml.Constant(2)) + Mathml.PZ
            + Mathml.Text(", kde ") + Mathml.Literal("h") + Mathml.Equal + Mathml.Frac(Mathml.Literal("b") + Mathml.Minus + Mathml.Literal("a"), Mathml.Literal("m")) + Mathml.Text(" a ") + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("i")) + Mathml.Equal + Mathml.Literal("a") + Mathml.Plus + Mathml.Literal("i") + Mathml.Literal("h")
            + Mathml.EndMath).ToString();

        public static string ComTrapezodial = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Munderover(Symbols.Integral, Mathml.Literal("a"), Mathml.Literal("b")) + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") + Mathml.PZ + Mathml.Mo(Symbols.AproximatelyEqual) + Mathml.Frac(Mathml.Literal("h"),Mathml.Constant(2))
            + Mathml.HLZ
            + Mathml.Literal("f")+Mathml.LZ+Mathml.Sub(Mathml.Literal("x"),Mathml.Constant(0)) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Constant(2)
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(1), Mathml.Literal("m") + Mathml.Minus + Mathml.Constant(1))
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("i")) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("m")) + Mathml.PZ
            + Mathml.HPZ 
            + Mathml.Text(", kde ") + Mathml.Literal("h") + Mathml.Equal + Mathml.Frac(Mathml.Literal("b") + Mathml.Minus + Mathml.Literal("a"), Mathml.Literal("m")) + Mathml.Text(" a ") + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("i")) + Mathml.Equal + Mathml.Literal("a") + Mathml.Plus + Mathml.Literal("i") + Mathml.Literal("h")
            + Mathml.EndMath).ToString();

        public static string ComSimpson = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Munderover(Symbols.Integral, Mathml.Literal("a"), Mathml.Literal("b")) + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") + Mathml.PZ + Mathml.Mo(Symbols.AproximatelyEqual) + Mathml.Frac(Mathml.Literal("h"),Mathml.Constant(3))
            + Mathml.HLZ
            + Mathml.Literal("f")+Mathml.LZ+Mathml.Sub(Mathml.Literal("x"),Mathml.Constant(0)) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Constant(4)
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(1), Mathml.Literal("m"))
            + Mathml.Literal("f")+Mathml.LZ+Mathml.Sub(Mathml.Literal("x"),Mathml.Constant(2)+Mathml.Literal("i")+Mathml.Minus+Mathml.Constant(1)) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Constant(2)
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(1), Mathml.Literal("m")+ Mathml.Minus + Mathml.Constant(1))
            + Mathml.Literal("f")+Mathml.LZ+Mathml.Sub(Mathml.Literal("x"),Mathml.Constant(2)+Mathml.Literal("i")) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Literal("f")+Mathml.LZ+Mathml.Sub(Mathml.Literal("x"),Mathml.Literal("m")) + Mathml.PZ
            + Mathml.HPZ 
            + Mathml.Text(", kde ") + Mathml.Literal("h") + Mathml.Equal + Mathml.Frac(Mathml.Literal("b") + Mathml.Minus + Mathml.Literal("a"), Mathml.Literal("m")) + Mathml.Text(" a ") + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("i")) + Mathml.Equal + Mathml.Literal("a") + Mathml.Plus + Mathml.Literal("i") + Mathml.Literal("h")
            + Mathml.EndMath).ToString();

        public static string ComBool = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Munderover(Symbols.Integral, Mathml.Literal("a"), Mathml.Literal("b")) + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") + Mathml.PZ + Mathml.Mo(Symbols.AproximatelyEqual) + Mathml.Frac(Mathml.Literal("h"),Mathml.Constant(45))
            + Mathml.HLZ
            + Mathml.Constant(7) + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Constant(0)) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Constant(32)
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(1), Mathml.Frac(Mathml.Literal("m"),Mathml.Constant(4)))
            + Mathml.LZ
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Constant(4) + Mathml.Literal("i") + Mathml.Minus + Mathml.Constant(1)) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Constant(4) + Mathml.Literal("i") + Mathml.Minus + Mathml.Constant(3)) + Mathml.PZ  
            + Mathml.PZ
            + Mathml.Mo("+")
            + Mathml.Constant(12)
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(1), Mathml.Frac(Mathml.Literal("m"), Mathml.Constant(4)))
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Constant(4) + Mathml.Literal("i") + Mathml.Minus + Mathml.Constant(2)) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Constant(2)+Mathml.Multiply+Mathml.Constant(7)
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(1), Mathml.Frac(Mathml.Literal("m"), Mathml.Constant(4))+Mathml.Minus+Mathml.Constant(1))
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Constant(4) + Mathml.Literal("i"))+Mathml.PZ
            + Mathml.Mo("+") + Mathml.Constant(7) + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("m")) + Mathml.PZ
            + Mathml.HPZ
            + Mathml.Text(", kde ") + Mathml.Literal("h") + Mathml.Equal + Mathml.Frac(Mathml.Literal("b") + Mathml.Minus + Mathml.Literal("a"), Mathml.Literal("m")) + Mathml.Text(" a ") + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("i")) + Mathml.Equal + Mathml.Literal("a") + Mathml.Plus + Mathml.Literal("i") + Mathml.Literal("h")
            + Mathml.EndMath).ToString();

        public static string ComThreeEighths = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Munderover(Symbols.Integral, Mathml.Literal("a"), Mathml.Literal("b")) + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") + Mathml.PZ + Mathml.Mo(Symbols.AproximatelyEqual) + Mathml.Frac(Mathml.Constant(3)+Mathml.Literal("h"), Mathml.Constant(8))
            + Mathml.HLZ
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Constant(0)) + Mathml.PZ
            + Mathml.Mo("+")
            + Mathml.Constant(3)
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(1), Mathml.Frac(Mathml.Literal("m"), Mathml.Constant(3)))
            + Mathml.LZ
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Constant(3) + Mathml.Literal("i") + Mathml.Minus + Mathml.Constant(1)) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Constant(3) + Mathml.Literal("i") + Mathml.Minus + Mathml.Constant(2)) + Mathml.PZ
            + Mathml.PZ
            + Mathml.Mo("+")
            + Mathml.Constant(2)
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(1), Mathml.Frac(Mathml.Literal("m"), Mathml.Constant(3)) + Mathml.Minus + Mathml.Constant(1))
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Constant(3) + Mathml.Literal("i")) + Mathml.PZ
            + Mathml.Mo("+") + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("m")) + Mathml.PZ
            + Mathml.HPZ
            + Mathml.Text(", kde ") + Mathml.Literal("h") + Mathml.Equal + Mathml.Frac(Mathml.Literal("b") + Mathml.Minus + Mathml.Literal("a"), Mathml.Literal("m")) + Mathml.Text(" a ") + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("i")) + Mathml.Equal + Mathml.Literal("a") + Mathml.Plus + Mathml.Literal("i") + Mathml.Literal("h")
            + Mathml.EndMath).ToString();

        public static string RombergIntegration = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline)
            + Mathml.SupSub(Mathml.Literal("I"),Mathml.Constant(2)+Mathml.Literal("h"),Mathml.Literal("k"))
            + Mathml.Equal
            + Mathml.Frac(Mathml.Sup(Mathml.Constant(4),Mathml.Literal("k"))+Mathml.SupSub(Mathml.Literal("I"),Mathml.Constant(2)+Mathml.Literal("h"),Mathml.Literal("k")+Mathml.Minus+Mathml.Constant(1)) + Mathml.Minus + Mathml.SupSub(Mathml.Literal("I"),Mathml.Literal("h"),Mathml.Literal("k")+Mathml.Minus+Mathml.Constant(1)),Mathml.Sup(Mathml.Constant(4),Mathml.Literal("k"))+Mathml.Minus+Mathml.Constant(1))
            + Mathml.EndMath).ToString();

        public static string GaussLegendre = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Munderover(Symbols.Integral, Mathml.Literal("a"), Mathml.Literal("b")) + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") + Mathml.PZ + Mathml.Mo(Symbols.AproximatelyEqual) + Mathml.Frac(Mathml.Literal("h"),Mathml.Constant(2))
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("j") + Mathml.Equal + Mathml.Constant(0),Mathml.Literal("m") + Mathml.Minus + Mathml.Constant(1))
            + Mathml.LZ
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(0), Mathml.Literal("n"))
            + Mathml.Sub(Mathml.Literal(Symbols.omega),Mathml.Literal("i"))+Mathml.Literal("f")+Mathml.LZ+Mathml.Frac(Mathml.Constant(1),Mathml.Constant(2))
            + Mathml.Sub(Mathml.Literal("x"),Mathml.Literal("i"))+Mathml.Literal("h")+Mathml.Plus+Mathml.Literal("a")+Mathml.Plus+Mathml.Literal("h")+Mathml.LZ+Mathml.Literal("j")+Mathml.Plus+Mathml.Frac(Mathml.Constant(1),Mathml.Constant(2))+Mathml.PZ+Mathml.PZ+Mathml.PZ
            + Mathml.Text(", kde ") + Mathml.Literal("h") + Mathml.Equal + Mathml.Frac(Mathml.Literal("b") + Mathml.Minus + Mathml.Literal("a"), Mathml.Literal("m")) + Mathml.Text(" a ") + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("i")) + Mathml.Equal + Mathml.Literal("a") + Mathml.Plus + Mathml.Literal("i") + Mathml.Literal("h")
            + Mathml.LineBreak + Mathml.EndMath
            + Html.Div()+Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal(Symbols.omega), Mathml.Literal("i")) + Mathml.EndMath + Html.Span(" jsou koeficienty Gaussova-Legendrova kvadraturního vzorce.")
            + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.LineBreak +Mathml.EndMath+Html.EndDiv
            + Html.Div()+Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("i")) +Mathml.EndMath+ Html.Span(" volíme jako kořeny Legendrových polynomů.")+Html.EndDiv).ToString();

        public static string FirstLinearDerivation = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline)
            + Mathml.Sup(Mathml.Literal("f"),Mathml.Literal(Symbols.FirstDer))+Mathml.LZ+Mathml.Literal("x")+Mathml.PZ+Mathml.Equal
            + Mathml.Frac(Mathml.Literal("f")+Mathml.LZ+Mathml.Literal("x")+Mathml.Plus+Mathml.Literal("h")+Mathml.PZ+Mathml.Minus+Mathml.Literal("f")+Mathml.LZ+Mathml.Literal("x")+Mathml.PZ,Mathml.Literal("h"))
            + Mathml.EndMath).ToString();

        public static string FirstQuadraticDerivation = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline)
            + Mathml.Sup(Mathml.Literal("f"), Mathml.Literal(Symbols.FirstDer)) + Mathml.LZ + Mathml.Literal("x") + Mathml.PZ + Mathml.Equal
            + Mathml.Frac(Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") + Mathml.Plus + Mathml.Literal("h") + Mathml.PZ + Mathml.Minus + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x")+Mathml.Minus+Mathml.Literal("h") + Mathml.PZ, Mathml.Constant(2)+Mathml.Literal("h"))
            + Mathml.EndMath).ToString();

        public static string SecondDerivation = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline)
            + Mathml.Sup(Mathml.Literal("f"), Mathml.Literal(Symbols.SecondDer)) + Mathml.LZ + Mathml.Literal("x") + Mathml.PZ + Mathml.Equal
            + Mathml.Frac(Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") + Mathml.Plus + Mathml.Literal("h") + Mathml.PZ + Mathml.Minus + Mathml.Constant(2) + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") +Mathml.PZ + Mathml.Plus + Mathml.Literal("f") + Mathml.LZ + Mathml.Literal("x") + Mathml.Minus + Mathml.Literal("h") + Mathml.PZ, Mathml.Sup(Mathml.Literal("h"),Mathml.Constant(2)))
            + Mathml.EndMath).ToString();

        public static string RichardsonExtrapolation = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline)
            + Mathml.Sub(Mathml.Literal("R"), Mathml.Literal("j")) + Mathml.LZ + Mathml.Literal("h") + Mathml.PZ + Mathml.Equal
            + Mathml.Sub(Mathml.Literal("R"), Mathml.Literal("j") + Mathml.Minus + Mathml.Constant(1)) + Mathml.LZ + Mathml.Frac(Mathml.Literal("h"), Mathml.Constant(2)) + Mathml.PZ
            + Mathml.Mo("+")
            + Mathml.Frac(Mathml.Sub(Mathml.Literal("R"), Mathml.Literal("j") + Mathml.Minus + Mathml.Constant(1)) + Mathml.LZ + Mathml.Frac(Mathml.Literal("h"), Mathml.Constant(2)) + Mathml.PZ + Mathml.Minus + Mathml.Sub(Mathml.Literal("R"), Mathml.Literal("j") + Mathml.Minus + Mathml.Constant(1)) + Mathml.LZ + Mathml.Literal("h") + Mathml.PZ, Mathml.Sup(Mathml.Constant(2), Mathml.Literal("j") + Mathml.Minus + Mathml.Constant(1)) + Mathml.Minus + Mathml.Constant(1))
            + Mathml.EndMath).ToString();

        public static string BisectionMethod = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline)
            + Mathml.Text("Musí platit:    ") + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("a"), Mathml.Constant(0)) + Mathml.PZ + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("b"), Mathml.Constant(0)) + Mathml.PZ + Mathml.Literal(Symbols.LessEqual) + Mathml.Constant(0)
            + Mathml.LineBreak
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n")) + Mathml.PZ + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.PZ + Mathml.Literal(Symbols.LessThan) + Mathml.Constant(0) + Mathml.Literal(Symbols.RightArrow)
            + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n") + Mathml.Plus + Mathml.Constant(1)) + Mathml.Literal(Mathml.Equal) + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n")) + Mathml.Text(" , ")
            + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("n") + Mathml.Plus + Mathml.Constant(1)) + Mathml.Literal(Mathml.Equal) + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n"))
            + Mathml.LineBreak
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n")) + Mathml.PZ + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.PZ + Mathml.Literal(Symbols.GreaterThan) + Mathml.Constant(0) + Mathml.Literal(Symbols.RightArrow)
            + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n") + Mathml.Plus + Mathml.Constant(1)) + Mathml.Literal(Mathml.Equal) + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.Text(" , ")
            + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("n") + Mathml.Plus + Mathml.Constant(1)) + Mathml.Literal(Mathml.Equal) + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("n"))
            + Mathml.LineBreak
            + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.Equal + Mathml.Frac(Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n")) + Mathml.Plus + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("n")), Mathml.Constant(2))
            + Mathml.EndMath).ToString();

        public static string RegulaFalsi = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline)
            + Mathml.Text("Musí platit:    ") + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("a"), Mathml.Constant(0)) + Mathml.PZ + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("b"), Mathml.Constant(0)) + Mathml.PZ + Mathml.Literal(Symbols.LessEqual) + Mathml.Constant(0)
            + Mathml.LineBreak
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n")) + Mathml.PZ + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.PZ + Mathml.Literal(Symbols.LessThan) + Mathml.Constant(0) + Mathml.Literal(Symbols.RightArrow)
            + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n") + Mathml.Plus + Mathml.Constant(1)) + Mathml.Literal(Mathml.Equal) + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n")) + Mathml.Text(" , ")
            + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("n") + Mathml.Plus + Mathml.Constant(1)) + Mathml.Literal(Mathml.Equal) + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n"))
            + Mathml.LineBreak
            + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n")) + Mathml.PZ + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.PZ + Mathml.Literal(Symbols.GreaterThan) + Mathml.Constant(0) + Mathml.Literal(Symbols.RightArrow)
            + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n") + Mathml.Plus + Mathml.Constant(1)) + Mathml.Literal(Mathml.Equal) + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.Text(" , ")
            + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("n") + Mathml.Plus + Mathml.Constant(1)) + Mathml.Literal(Mathml.Equal) + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("n"))
            + Mathml.LineBreak
            + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.Equal + Mathml.Frac(Mathml.Literal("f") +Mathml.LZ + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("n")) +Mathml.PZ +  Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n")) + Mathml.Minus + Mathml.Literal("f") +Mathml.LZ + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n")) +Mathml.PZ +  Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("n")), Mathml.Literal("f") +Mathml.LZ + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("n")) + Mathml.PZ + Mathml.Minus + Mathml.Literal("f") +Mathml.LZ + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("n")) +Mathml.PZ)
            + Mathml.EndMath).ToString();

        public static string SecantMethod = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline)
            + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n") + Mathml.Plus + Mathml.Constant(1)) + Mathml.Equal
            + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n"))
            + Mathml.Minus
            + Mathml.Frac(Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.PZ + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n"))+Mathml.Minus+Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")+Mathml.Minus+Mathml.Constant(1))+Mathml.PZ,Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.PZ + Mathml.Minus + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n") + Mathml.Minus+Mathml.Constant(1)) + Mathml.PZ)
            + Mathml.EndMath).ToString();

        public static string NewtonsMethod = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline)
            + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")+Mathml.Plus+Mathml.Constant(1)) + Mathml.Equal
            + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n"))
            + Mathml.Minus
            + Mathml.Frac(Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.PZ,Mathml.Sup(Mathml.Literal("f"),Mathml.Literal(Symbols.FirstDer)) + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"),Mathml.Literal("n")) + Mathml.PZ)
            + Mathml.EndMath).ToString();

        public static string SteffensensMethod = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline)
            + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n") + Mathml.Plus + Mathml.Constant(1)) + Mathml.Equal
            + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n"))
            + Mathml.Minus
            + Mathml.Frac(Mathml.Sup(Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.PZ,Mathml.Constant(2)),Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.Plus + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.PZ + Mathml.PZ + Mathml.Minus + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.PZ)
            + Mathml.EndMath).ToString();

        public static string HalleysMethod = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline)
            + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n") + Mathml.Plus + Mathml.Constant(1)) + Mathml.Equal
            + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n"))
            + Mathml.Minus
            + Mathml.Frac(Mathml.Constant(2) + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.PZ  + Mathml.Sup(Mathml.Literal("f"),Mathml.Literal(Symbols.FirstDer)) + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"),Mathml.Literal("n")) + Mathml.PZ,  Mathml.Constant(2) + Mathml.Sup( Mathml.LZ + Mathml.Sup(Mathml.Literal("f"),Mathml.Literal(Symbols.FirstDer)) + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"),Mathml.Literal("n")) + Mathml.PZ + Mathml.PZ,Mathml.Constant(2)) + Mathml.Minus + Mathml.Literal("f") + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("n")) + Mathml.PZ+ Mathml.Sup(Mathml.Literal("f"),Mathml.Literal(Symbols.SecondDer)) + Mathml.LZ + Mathml.Sub(Mathml.Literal("x"),Mathml.Literal("n")) + Mathml.PZ)
            + Mathml.EndMath).ToString();

        public static string GaussElimination = new StringBuilder(Html.Span("Vztahy pro přímý chod:")
            +  Mathml.HeaderMath(Mathml.Display.block)
            + Mathml.LineBreak
            + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("j")) + Mathml.Equal + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("j")) + Mathml.Minus
            + Mathml.Frac(Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("k")), Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("k") + Mathml.Literal("k"))) + Mathml.Multiply
            + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("k") + Mathml.Literal("j"))
            + Mathml.LineBreak
            + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("i")) + Mathml.Equal + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("i")) + Mathml.Minus
            + Mathml.Frac(Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("k")), Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("k") + Mathml.Literal("k"))) + Mathml.Multiply
            + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("k"))
            + Mathml.LineBreak
            + Mathml.Literal("k") + Mathml.Equal + Mathml.Constant(1) + Mathml.Literal(",") + Mathml.Space(5) + Mathml.Text("...") + Mathml.Literal(",") + Mathml.Space(5) + Mathml.Literal("n") + Mathml.Minus + Mathml.Constant(1)
            + Mathml.LineBreak
            + Mathml.Literal("i") + Mathml.Equal + Mathml.Literal("k") + Mathml.Plus + Mathml.Constant(1) + Mathml.Literal(",") + Mathml.Space(5) + Mathml.Text("...") + Mathml.Literal(",") + Mathml.Space(5) + Mathml.Literal("n")
            + Mathml.LineBreak
            + Mathml.Literal("j") + Mathml.Equal + Mathml.Literal("k") + Mathml.Plus + Mathml.Constant(1) + Mathml.Literal(",") + Mathml.Space(5) + Mathml.Text("...") + Mathml.Literal(",") + Mathml.Space(5) + Mathml.Literal("n")
            + Mathml.LineBreak
            + Mathml.EndMath    
            + Html.Span("Vztah pro zpětný chod:")
            + Mathml.HeaderMath(Mathml.Display.block)
            + Mathml.Sub(Mathml.Literal("x"),Mathml.Literal("i")) + Mathml.Equal
            + Mathml.Frac(Mathml.Constant(1), Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("i")))
            + Mathml.LZ
            + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("i"))
            + Mathml.Minus
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("j") + Mathml.Equal + Mathml.Literal("i") + Mathml.Plus + Mathml.Constant(1), Mathml.Literal("n"))
            + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("j")) + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("j"))
            + Mathml.PZ
            + Mathml.Space(15) + Mathml.Literal("i") + Mathml.Equal + Mathml.Literal("n") + Mathml.Literal(",") + Mathml.Space(5) + Mathml.Text("...") + Mathml.Literal(",") + Mathml.Space(5) + Mathml.Constant(1) + Mathml.EndMath).ToString();
            

        public static string LUDecomposition = new StringBuilder(Mathml.HeaderMath(Mathml.Display.block) + Mathml.Literal("A") + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("b") + Mathml.Text(", kde") 
            + Mathml.Space() + Mathml.Literal("A") + Mathml.Equal + Mathml.Literal("L") + Mathml.Literal("U") 
            + Mathml.LineBreak + Mathml.Literal("L") + Mathml.Literal("U") + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("b") 
            + Mathml.LineBreak + Mathml.Literal("L") + Mathml.Literal("y") + Mathml.Equal + Mathml.Literal("b") 
            + Mathml.LineBreak + Mathml.Literal("U") + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("y") + Mathml.EndMath 
            + Html.Span("Vztahy pro výpočet matice") +Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Space() + Mathml.Literal("L") +Mathml.Space() + Mathml.EndMath +Html.Span("a")
            + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Space() + Mathml.Literal("U") + Mathml.EndMath + Html.Br 
            + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal("l"), Mathml.Literal("r") + Mathml.Literal("r")) + Mathml.Equal + Mathml.Constant(1) + Mathml.EndMath + Html.Br
        + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal("u"), Mathml.Literal("1") + Mathml.Literal("1")) + Mathml.Equal + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("1") + Mathml.Literal("1")) + Mathml.EndMath + Html.Br
        + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal("l"), Mathml.Literal("i") + Mathml.Literal("1")) + Mathml.Equal + Mathml.Frac(Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("1")), Mathml.Sub(Mathml.Literal("u"), Mathml.Literal("1") + Mathml.Literal("1")))
        + Mathml.EndMath + Html.Br
        + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal("u"), Mathml.Literal("1") + Mathml.Literal("r")) + Mathml.Equal + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("1") + Mathml.Literal("r")) + Mathml.EndMath + Html.Br
        + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal("u"), Mathml.Literal("i") + Mathml.Literal("r")) + Mathml.Equal + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("r")) + Mathml.Minus
        + Mathml.Munderover(Symbols.Sum, Mathml.Literal("j") + Mathml.Equal + Mathml.Constant(1), Mathml.Literal("i") + Mathml.Minus + Mathml.Constant(1)) + Mathml.Sub(Mathml.Literal("l"), Mathml.Literal("i") + Mathml.Literal("j")) + Mathml.Sub(Mathml.Literal("u"), Mathml.Literal("j") + Mathml.Literal("r"))
        + Mathml.Space(5) + Mathml.Text(", kde") + Mathml.Space(15) + Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(2) + Mathml.Text(", ... ,") + Mathml.Literal("r") + Mathml.EndMath + Html.Br
        + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal("l"), Mathml.Literal("i") + Mathml.Literal("r")) + Mathml.Equal + Mathml.Frac(Mathml.Constant(1), Mathml.Sub(Mathml.Literal("u"), Mathml.Literal("r") + Mathml.Literal("r"))) + Mathml.LZ
        + Mathml.Munderover(Symbols.Sum, Mathml.Literal("j") + Mathml.Equal + Mathml.Constant(1), Mathml.Literal("r") + Mathml.Minus + Mathml.Constant(1)) + Mathml.Sub(Mathml.Literal("l"), Mathml.Literal("i") + Mathml.Literal("j")) + Mathml.Sub(Mathml.Literal("u"), Mathml.Literal("j") + Mathml.Literal("r"))
        + Mathml.PZ
        + Mathml.Space(5) + Mathml.Text(", kde") + Mathml.Space(15) + Mathml.Literal("i") + Mathml.Equal + Mathml.Literal("r") + Mathml.Plus + Mathml.Constant(1) + Mathml.Text(", ... ,") + Mathml.Literal("n") + Mathml.EndMath + Html.Br 
        + Html.Br+ Html.Span("Poté můžeme řešit soustavy ") +Mathml.HeaderMath(Mathml.Display.inline) +Mathml.Literal("L")+Mathml.Literal("y")+Mathml.Equal+ Mathml.Literal("P") + Mathml.Literal("b") + Mathml.EndMath
        + Html.Span(" a ")
        + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Literal("U") + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("y") + Mathml.EndMath
        + Html.Span(" tímto způsobem: ") + Html.Br 
        + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal("y"), Mathml.Literal("i")) + Mathml.Equal + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("i")) + Mathml.Minus
        + Mathml.Munderover(Symbols.Sum, Mathml.Literal("k") + Mathml.Equal + Mathml.Constant(1), Mathml.Literal("i") + Mathml.Minus + Mathml.Constant(1))
        + Mathml.Sub(Mathml.Literal("l"), Mathml.Literal("i") + Mathml.Literal("k")) + Mathml.Sub(Mathml.Literal("y"), Mathml.Literal("k"))
        + Mathml.Space(5) + Mathml.Text(", kde") + Mathml.Space(15) + Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(1) + Mathml.Text(", ... ,") + Mathml.Literal("n")
        + Mathml.EndMath + Html.Br
        + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("i")) + Mathml.Equal + Mathml.Frac(Mathml.Constant(1), Mathml.Sub(Mathml.Literal("u"), Mathml.Literal("i") + Mathml.Literal("i")))
        + Mathml.LZ + Mathml.Sub(Mathml.Literal("y"), Mathml.Literal("i")) + Mathml.Minus
        + Mathml.Munderover(Symbols.Sum, Mathml.Literal("k") + Mathml.Equal + Mathml.Literal("i") + Mathml.Plus + Mathml.Constant(1), Mathml.Literal("n"))
        + Mathml.Sub(Mathml.Literal("u"), Mathml.Literal("i") + Mathml.Literal("k")) + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("k")) + Mathml.PZ
        + Mathml.Space(5) + Mathml.Text(", kde") + Mathml.Space(15) + Mathml.Literal("i") + Mathml.Equal + Mathml.Literal("n") + Mathml.Text(", ... ,") + Mathml.Constant(1) + Mathml.EndMath).ToString();




        public static string CholeskyDecomposition = new StringBuilder(Mathml.HeaderMath(Mathml.Display.block) + Mathml.Literal("A") + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("b") + Mathml.Text(", kde") 
            + Mathml.Space() + Mathml.Literal("A") + Mathml.Equal + Mathml.Literal("L") + Mathml.Sup(Mathml.Literal("L"),Mathml.Literal("t")) 
            + Mathml.LineBreak + Mathml.Literal("L") + Mathml.Sup(Mathml.Literal("L"), Mathml.Literal("t")) + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("b") 
            + Mathml.LineBreak + Mathml.Literal("L") + Mathml.Literal("y") + Mathml.Equal + Mathml.Literal("b") 
            + Mathml.LineBreak + Mathml.Sup(Mathml.Literal("L"), Mathml.Literal("t")) + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("y") + Mathml.EndMath 
            + Html.Span("Vztahy pro výpočet matice") +Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Space() + Mathml.Literal("L") + Mathml.EndMath + Html.Br
            + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal("l"), Mathml.Literal("k") + Mathml.Literal("k")) + Mathml.Equal
            + Mathml.Sqrt(Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("k") + Mathml.Literal("k")) + Mathml.Minus + Mathml.Munderover(Symbols.Sum, Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(1), Mathml.Literal("k") + Mathml.Minus + Mathml.Constant(1))
            + Mathml.SupSub(Mathml.Literal("l"), Mathml.Literal("k") + Mathml.Literal("i"), Mathml.Constant(2))) + Mathml.EndMath
            + Html.Br
            + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal("l"), Mathml.Literal("i") + Mathml.Literal("j")) + Mathml.Equal
            + Mathml.Frac(Mathml.Constant(1), Mathml.Sub(Mathml.Literal("l"), Mathml.Literal("j") + Mathml.Literal("j")))
            + Mathml.LZ
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("k") + Mathml.Equal + Mathml.Constant(1), Mathml.Literal("j") + Mathml.Minus + Mathml.Constant(1))
            + Mathml.Sub(Mathml.Literal("l"), Mathml.Literal("i") + Mathml.Literal("k"))
            + Mathml.Sub(Mathml.Literal("l"), Mathml.Literal("j") + Mathml.Literal("k")) 
            + Mathml.PZ + Mathml.EndMath
            + Html.Br + Html.Span("Poté můžeme řešit soustavy ") + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Literal("L") + Mathml.Literal("y") + Mathml.Equal + Mathml.Literal("b") + Mathml.EndMath
            + Html.Span(" a ")
            + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sup(Mathml.Literal("L"), Mathml.Literal("t")) + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("y") + Mathml.EndMath
            + Html.Span(" tímto způsobem: ") + Html.Br
            + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal("y"), Mathml.Literal("i")) + Mathml.Equal + Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("i")) + Mathml.Minus
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("k") + Mathml.Equal + Mathml.Constant(1), Mathml.Literal("i") + Mathml.Minus + Mathml.Constant(1))
            + Mathml.Sub(Mathml.Literal("l"), Mathml.Literal("i") + Mathml.Literal("k")) + Mathml.Sub(Mathml.Literal("y"), Mathml.Literal("k"))
            + Mathml.Space(5) + Mathml.Text(", kde") + Mathml.Space(15) + Mathml.Literal("i") + Mathml.Equal + Mathml.Constant(1) + Mathml.Text(", ... ,") + Mathml.Literal("n")
            + Mathml.EndMath + Html.Br
            + Mathml.HeaderMath(Mathml.Display.inline) + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("i")) + Mathml.Equal + Mathml.Frac(Mathml.Constant(1), Mathml.SupSub(Mathml.Literal("l"), Mathml.Literal("i")+Mathml.Literal("i"),Mathml.Literal("t")))
            + Mathml.LZ + Mathml.Sub(Mathml.Literal("y"), Mathml.Literal("i")) + Mathml.Minus
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("k") + Mathml.Equal + Mathml.Literal("i") + Mathml.Plus + Mathml.Constant(1), Mathml.Literal("n"))
            + Mathml.SupSub(Mathml.Literal("l"), Mathml.Literal("i")+Mathml.Literal("k"),Mathml.Literal("t")) + Mathml.Sub(Mathml.Literal("x"), Mathml.Literal("k")) + Mathml.PZ
            + Mathml.Space(5) + Mathml.Text(", kde") + Mathml.Space(15) + Mathml.Literal("i") + Mathml.Equal + Mathml.Literal("n") + Mathml.Text(", ... ,") + Mathml.Constant(1) + Mathml.EndMath).ToString();

        public static string JacobiMethodFolder = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline) + Mathml.SupSub(Mathml.Literal("x"), Mathml.Literal("i"), Mathml.LZ + Mathml.Literal("k") + Mathml.Plus + Mathml.Constant(1) + Mathml.PZ) + Mathml.Equal
            + Mathml.Frac(Mathml.Constant(1), Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("ii"))) + Mathml.LZ + Mathml.Minus + Mathml.Munderover(Symbols.Sum, Mathml.Literal("j") + Mathml.Equal + Mathml.Constant(1), Mathml.Literal("i") + Mathml.Minus + Mathml.Constant(1))
            + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("j")) + Mathml.SupSub(Mathml.Literal("x"), Mathml.Literal("j"), Mathml.LZ + Mathml.Literal("k") + Mathml.PZ) + Mathml.Minus
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("j") + Mathml.Equal + Mathml.Literal("i") + Mathml.Plus + Mathml.Constant(1), Mathml.Literal("n"))
            + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("j")) + Mathml.SupSub(Mathml.Literal("x"), Mathml.Literal("j"), Mathml.LZ + Mathml.Literal("k") + Mathml.PZ) + Mathml.PZ
            + Mathml.Plus + Mathml.Frac(Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("i")), Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("i")))+Mathml.EndMath).ToString();

        public static string JacobiMethodMatrix = new StringBuilder(Mathml.HeaderMath(Mathml.Display.block) + Mathml.Literal("A") + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("b") + Mathml.Text(", kde") + Mathml.LineBreak
            + Mathml.Literal("A") + Mathml.Equal + Mathml.Literal("E") + Mathml.Plus + Mathml.Literal("D") + Mathml.Plus  + Mathml.Literal("F") + Mathml.Text(", proto")
            + Mathml.LineBreak + Mathml.LZ + Mathml.Literal("E") + Mathml.Plus + Mathml.Literal("D") + Mathml.Plus + Mathml.Literal("F") + Mathml.PZ + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("b") + Mathml.LineBreak
            + Mathml.Literal("E") +Mathml.Space() + Mathml.Text("je ostře dolní trojúhelníková matice") + Mathml.LineBreak
            + Mathml.Literal("D") + Mathml.Space() + Mathml.Text("je diagonální matice") + Mathml.LineBreak
            + Mathml.Literal("F") + Mathml.Space() + Mathml.Text("je ostře horní trojúhelníková matice") + Mathml.LineBreak
            + Mathml.Sup(Mathml.Literal("x"), Mathml.Literal("k")+Mathml.Plus+Mathml.Constant(1))+Mathml.Equal + Mathml.Minus + Mathml.Sup(Mathml.Literal("D"), Mathml.Row(Mathml.Minus + Mathml.Constant(1)))
            + Mathml.LZ + Mathml.Literal("E") + Mathml.Plus + Mathml.Literal("F") + Mathml.PZ + Mathml.Sup(Mathml.Literal("x"),Mathml.Literal("k")) +Mathml.Plus+ Mathml.Sup(Mathml.Literal("D"), Mathml.Row(Mathml.Minus + Mathml.Constant(1))) + Mathml.Literal("b")+Mathml.EndMath).ToString();

        public static string GaussSeidelMethodFolder = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline)+ Mathml.SupSub(Mathml.Literal("x"), Mathml.Literal("i"), Mathml.LZ + Mathml.Literal("k") + Mathml.Plus + Mathml.Constant(1) + Mathml.PZ) + Mathml.Equal
            + Mathml.Frac(Mathml.Constant(1), Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("i"))) + Mathml.LZ + Mathml.Minus + Mathml.Munderover(Symbols.Sum, Mathml.Literal("j") + Mathml.Equal + Mathml.Constant(1), Mathml.Literal("i") + Mathml.Minus + Mathml.Constant(1))
            + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("j")) + Mathml.SupSub(Mathml.Literal("x"), Mathml.Literal("j"), Mathml.LZ + Mathml.Literal("k") + Mathml.Plus + Mathml.Constant(1) + Mathml.PZ) + Mathml.Minus
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("j") + Mathml.Equal + Mathml.Literal("i") + Mathml.Plus + Mathml.Constant(1), Mathml.Literal("n"))
            + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("j")) + Mathml.SupSub(Mathml.Literal("x"), Mathml.Literal("j"), Mathml.LZ + Mathml.Literal("k") + Mathml.PZ) + Mathml.PZ
            + Mathml.Plus + Mathml.Frac(Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("i")), Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("i")))+Mathml.EndMath).ToString();

        public static string GaussSeidelMethodMatrix = new StringBuilder(Mathml.HeaderMath(Mathml.Display.block) + Mathml.Literal("A") + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("b") + Mathml.Text(", kde") + Mathml.LineBreak
            + Mathml.Literal("A") + Mathml.Equal + Mathml.Literal("D") + Mathml.Plus + Mathml.Literal("E") + Mathml.Plus + Mathml.Literal("F") + Mathml.Text(", proto")
            + Mathml.LineBreak + Mathml.LZ + Mathml.Literal("E") + Mathml.Plus + Mathml.Literal("D") + Mathml.PZ + Mathml.Literal("x") + Mathml.Plus + Mathml.Literal("F") + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("b") + Mathml.LineBreak
            + Mathml.Literal("E") + Mathml.Space() + Mathml.Text("je ostře dolní trojúhelníková matice") + Mathml.LineBreak
            + Mathml.Literal("D") + Mathml.Space() + Mathml.Text("je diagonální matice") + Mathml.LineBreak
            + Mathml.Literal("F") + Mathml.Space() + Mathml.Text("je ostře horní trojúhelníková matice") + Mathml.LineBreak + Mathml.Sup(Mathml.Literal("x"), Mathml.Literal("k") + Mathml.Plus + Mathml.Constant(1)) + Mathml.Equal + Mathml.Minus + Mathml.Sup(Mathml.LZ + Mathml.Literal("D") + Mathml.Plus + Mathml.Literal("E") + Mathml.PZ, Mathml.Row(Mathml.Minus + Mathml.Constant(1)))
            + Mathml.Literal("F") + Mathml.Sup(Mathml.Literal("x"), Mathml.Literal("k")) + Mathml.Plus + Mathml.Sup(Mathml.LZ + Mathml.Literal("D") + Mathml.Plus + Mathml.Literal("E") + Mathml.PZ, Mathml.Row(Mathml.Minus + Mathml.Constant(1))) + Mathml.Literal("b")+Mathml.EndMath).ToString();


        public static string SORMethodFolder = new StringBuilder(Mathml.HeaderMath(Mathml.Display.inline) + Mathml.SupSub(Mathml.Literal("x"), Mathml.Literal("i"), Mathml.LZ + Mathml.Literal("k") + Mathml.Plus + Mathml.Constant(1) + Mathml.PZ) + Mathml.Equal
            + Mathml.SupSub(Mathml.Literal("x"), Mathml.Literal("i"), Mathml.LZ + Mathml.Literal("k") + Mathml.PZ) + Mathml.Plus + Mathml.Literal(Symbols.omega) + Mathml.LZ + Mathml.SupSub(Mathml.Mover(Mathml.Literal("x"), Mathml.Literal("_")), Mathml.Literal("i"), Mathml.LZ + Mathml.Literal("k") + Mathml.Plus + Mathml.Constant(1) + Mathml.PZ) 
            + Mathml.Minus + Mathml.SupSub(Mathml.Literal("x"), Mathml.Literal("i"), Mathml.LZ + Mathml.Literal("k") + Mathml.PZ) + Mathml.PZ
            + Mathml.EndMath + Html.Span(", kde") + Html.Br + Mathml.HeaderMath(Mathml.Display.inline)
            + Mathml.SupSub(Mathml.Mover(Mathml.Literal("x"), Mathml.Literal("_")), Mathml.Literal("i"), Mathml.LZ + Mathml.Literal("k") + Mathml.Plus + Mathml.Constant(1) + Mathml.PZ) + Mathml.Equal
            + Mathml.Frac(Mathml.Constant(1), Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("i"))) + Mathml.LZ + Mathml.Minus + Mathml.Munderover(Symbols.Sum, Mathml.Literal("j") + Mathml.Equal + Mathml.Constant(1), Mathml.Literal("i") + Mathml.Minus + Mathml.Constant(1))
            + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("j")) + Mathml.SupSub(Mathml.Literal("x"), Mathml.Literal("j"), Mathml.LZ + Mathml.Literal("k") + Mathml.Plus + Mathml.Constant(1) + Mathml.PZ) + Mathml.Minus
            + Mathml.Munderover(Symbols.Sum, Mathml.Literal("j") + Mathml.Equal + Mathml.Literal("i") + Mathml.Plus + Mathml.Constant(1), Mathml.Literal("n"))
            + Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("j")) + Mathml.SupSub(Mathml.Literal("x"), Mathml.Literal("j"), Mathml.LZ + Mathml.Literal("k") + Mathml.PZ) + Mathml.PZ
            + Mathml.Plus + Mathml.Frac(Mathml.Sub(Mathml.Literal("b"), Mathml.Literal("i")), Mathml.Sub(Mathml.Literal("a"), Mathml.Literal("i") + Mathml.Literal("i")))+Mathml.EndMath).ToString();

        public static string SORMethodMatrix = new StringBuilder(Mathml.HeaderMath(Mathml.Display.block) + Mathml.Literal("A") + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("b") + Mathml.Text(", kde") + Mathml.LineBreak
            + Mathml.Literal("A") + Mathml.Equal + Mathml.Literal("E") + Mathml.Plus + Mathml.Literal("D") + Mathml.Plus + Mathml.Literal("F") + Mathml.Text(", proto")
            + Mathml.LineBreak + Mathml.LZ + Mathml.Literal("E") + Mathml.Plus + Mathml.Literal("D") + Mathml.Plus + Mathml.Literal("F") + Mathml.PZ + Mathml.Literal("x") + Mathml.Equal + Mathml.Literal("b") + Mathml.LineBreak
            + Mathml.Literal("E") + Mathml.Space() + Mathml.Text("je ostře dolní trojúhelníková matice") + Mathml.LineBreak
            + Mathml.Literal("D") + Mathml.Space() + Mathml.Text("je diagonální matice") + Mathml.LineBreak
            + Mathml.Literal("F") + Mathml.Space() + Mathml.Text("je ostře horní trojúhelníková matice") + Mathml.LineBreak
            + Mathml.Sup(Mathml.Literal("x"), Mathml.Literal("k") + Mathml.Plus + Mathml.Constant(1)) + Mathml.Equal + Mathml.Sup(Mathml.LZ + Mathml.Literal("D") + Mathml.Plus + Mathml.Literal(Symbols.omega) + Mathml.Literal("E") + Mathml.PZ, Mathml.Row(Mathml.Minus + Mathml.Constant(1)))
            + Mathml.HLZ + Mathml.LZ + Mathml.Constant(1) + Mathml.Minus + Mathml.Literal(Symbols.omega) + Mathml.PZ + Mathml.Literal("D") + Mathml.Minus + Mathml.Literal(Symbols.omega) + Mathml.Literal("F") + Mathml.HPZ + Mathml.Sup(Mathml.Literal("x"), Mathml.Literal("k")) + Mathml.Plus +
            Mathml.Sup(Mathml.LZ + Mathml.Literal("D") + Mathml.Plus + Mathml.Literal(Symbols.omega) + Mathml.Literal("E") + Mathml.PZ, Mathml.Row(Mathml.Minus + Mathml.Constant(1))) + Mathml.Literal(Symbols.omega) + Mathml.Literal("b")+Mathml.EndMath).ToString();

    }
}
